# Allow ArcGIS to overwrite existing datasets:
## Not run: rpygeo.env$overwriteoutput = 1
# # Calculate the slope of a DEM raster dataset
# # in the current ArcGIS workspace:
# rpygeo.geoprocessor("Slope_sa",c("dem","slope"))
# # Same:
# rpygeo.geoprocessor("Slope_sa('dem','slope')")
# # Same, using the more convenient wrapper:
# rpygeo.Slope.sa("dem","slope")## End(Not run)
# Three at a time or separately:
## Not run: date()
# rpygeo.geoprocessor("Slope_sa('dem','slope')",
# "Aspect_sa('dem','aspect')", "Hillshade_sa('dem','hshd')")
# date() # ~20 sec on my computer
# rpygeo.Slope.sa("dem","slope")
# rpygeo.Aspect.sa("dem","aspect")
# rpygeo.Hillshade.sa("dem","hshd")
# date() # ~50 sec
# rpygeo.Delete.management("slope")
# rpygeo.Delete.management("aspect")
# rpygeo.Delete.management("hshd")## End(Not run)
# Calculate the Euclidian distance from railway lines
# up to a max. distance of 1000 map units:
## Not run: rpygeo.geoprocessor("EucDistance_sa",
# args=list("rail.shp","raildist",1000))
# # Same:
# rpygeo.EucDistance.sa("rail.shp","raildist",maxdist=1000)## End(Not run)
# Use MapAlgebra to calculate a distance-decay function:
## Not run: rpygeo.geoprocessor("SingleOutputMapAlgebra_sa",
# args=c("exp( raildist / -100 )","distdecay"))## End(Not run)
# Or why not in just one step if you like MapAlgebra:
## Not run: rpygeo.geoprocessor( "SingleOutputMapAlgebra_sa",
# args=c("exp( EucDistance( rail.shp, \#, \#, 1000 ) / -100 )","distdecay") )## End(Not run)
Run the code above in your browser using DataLab